def user():
    answer = input("what you want to put in your bag? ")
    return answer

def put(answer,bag =None):
    bag[answer] = 0
    

def main():
    signal =True
    bag = {}
    while signal:
        answer = user()        
        if answer in bag:
            bag[answer] += 1            
        else:
            put(answer,bag)
        print(bag)

main()